<?php

use Illuminate\Database\Seeder;

class AdminUserSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $salt = getSalt(6);
        $data = [
            'name' => '管理员',
            'account' => 'admin',
            'password' => encrypt_sha_md5('admin!@#123', $salt),
            'salt' => $salt,
            'created_at' => date('Y-m-d H:i:s', time())
        ];

        $adminUserModel = new \App\Models\AdminUser();
        DB::table($adminUserModel->getTable())->insert($data);

    }
}
